package de.hpi.generator.config;

import de.hpi.generator.helpers.JSONHelper;
/**
 *
 * @author Michael Wolowyk
 * JSON configuration parser
 * 
 */

public class JSONConfigParser {

    /**
     * reads a configuration file
     * @param aFileName a path to the configuration file
     * @return DatabaseModel got from the  configuration file
     * @throws Exception 
     */
    public static DatabaseModel readConfigFile(String aFileName) throws Exception {
        return (DatabaseModel) JSONHelper.deserializeObject(aFileName, DatabaseModel.class);
    }
}
